/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-24 16:11:22
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-24 16:11:26
 * @别瞎看: 你个无脑牛马
 */
// Rectangle 类继承自 Shape
class Rectangle extends Shape {
    // 属性：长和宽
    double width;
    double height;

    // 构造方法
    public Rectangle(String color, double width, double height) {
        super(color); // 调用父类的构造方法
        this.width = width;
        this.height = height;
    }

    // 实现 area() 方法
    @Override
    public double area() {
        return width * height;
    }
}